#!/usr/bin/perl

use CGI qw(:standard);
use strict;
use warnings;

my $fils = param('f');
my $cols = param('c');

print header(-type => 'application/xml');

print "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";

if ($fils > 0 && $cols > 0 && $fils < 10 && $cols < 10) {
  print "<tabla>\n";

  for (my $i = 0; $i < $fils; $i++) {
    print "  <fila_$i>\n";
    for (my $j= 0; $j < $cols; $j++) {
      print "    <columna_$j>[$i,$j]</columna_$j>\n";
    }
    print "  </fila_$i>\n";
  }

  print  "</tabla>\n";
} else {
  print "<tabla_vacia> </tabla_vacia>\n";
}
